home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_07 / storn2 / stdtyp.h < prev   
C/C++ Source or Header  |  1993-08-14  |  5KB  |  91 lines

  1. #ifndef _STDTYP
  2. /***C*H***************************************************************
  3. **                                                                  **
  4. ** SRC-MODULE   : stdtyp.h                                          **
  5. ** VERSION      : 0102                                              **
  6. ** LONG_NAME    : declaration of STandarD TYPes                     **
  7. **                                                                  **
  8. **                                                                  **
  9. ** SP_NO        :                                                   **
  10. ** SUBSYSTEM    : all subsystems                                    **
  11. ** SYSTEM_TYPE  : 486 PC                                            **
  12. **                                                                  **
  13. ** AUTHOR       : Maucher, ZFE ST ACK 21, 44031                     **
  14. ** SUBSTITUTE   : Storn,   ZFE ST ACK 21, 40502                     **
  15. **                                                                  **
  16. ** DESCRIPTION  : To guarantee a high portability of C programs,    **
  17. **                standard C types shall not be used, because they  **
  18. **                can represent a different number of bytes on      **
  19. **                different processors.                             **
  20. **                The following types, which have to be adapted to  **
  21. **                each processor (and C-compiler), shall be used.   **
  22. **                                                                  **
  23. **                Some additional definitions concern boolean values**
  24. **                and storage classes.                              **
  25. **                                                                  **
  26. ** REMARKS      : This header file works with Microsoft C 6.0.      **
  27. **                                                                  **
  28. ** COPYRIGHT    : (c) Copyright Siemens AG, 1993                    **
  29. **                                                                  **
  30. ***C*H*E**************************************************************/
  31.  
  32. /***H*O*C*************************************************************
  33. **                                                                  **
  34. ** No.!Version! Date ! Request !     Modifikation          ! Author **
  35. ** ---+-------+------+---------+---------------------------+------- **
  36. **    !       !190990!         ! first creation            ! Mau    **
  37. **    !       !      !         !                           !        **
  38. **  1 ! 0101  !150191! REVIEW  ! remove #ifndef, add LOCAL,! pjk    **
  39. **    !       !      !         ! add NEQ, change some type-!        **
  40. **    !       !      !         ! defs                      !        **
  41. **  2 ! 0102  !140391! REVIEW  ! typedefs                  ! voi    **
  42. **    !       !      !         !                           !        **
  43. **    !       !      !         !                           !        **
  44. **                                                                  **
  45. ***H*O*C*E***********************************************************/
  46.  
  47. /*---------------Defines--------------------------------------------*/
  48.  
  49. #define EQ     ==               /* Comparison for equality        */
  50. #define NEQ    !=               /* Comparison for non equality    */
  51. #define AND    &&               /* logical and                    */
  52. #define OR     ||               /* logical or                     */
  53.  
  54. #define TRUE   1                /* boolean value true             */
  55. #define FALSE  0                /* bollean value false            */
  56. #define BOOL   int              /* Type Bool                      */
  57.  
  58. /*---------------Macros---------------------------------------------*/
  59.  
  60. #define init_pointer(x,y)  ((x)=(y))  /* pointer initialization   */
  61.  
  62. /*---------------STORAGE CLASSES------------------------------------*/
  63.  
  64. #define EXPORT                  /* definition of global variables */
  65.                                 /* and functions used also by     */
  66.                                 /* other modules.                 */
  67.  
  68. #define IMPORT extern           /* reference to global variables  */
  69.                                 /* and functions, defined by      */
  70.                                 /* another module.                */
  71.  
  72. #define LOCAL static            /* reference to global variables  */
  73.                                 /* and functions, defined and     */
  74.                                 /* used by actual module.         */
  75.  
  76. /*---------------Typedefs--------------------------------------------*/
  77.  
  78. typedef signed long    LONG;   /* 32bit *//* range: -2**31 ... 2**31-1*/
  79. typedef unsigned long  ULONG;             /* range:      0 ... 2**32-1*/
  80.  
  81. typedef signed int     SHORT;  /* 16bit *//* range: -32768 ... +32767 */
  82. typedef unsigned int   USHORT;            /* range:      0 ... +65535 */
  83.  
  84. typedef signed char    CHAR;   /*  8bit *//* range:   -128 ... +127   */
  85. typedef unsigned char  UCHAR;             /* range:      0 ... +255   */
  86.  
  87. typedef unsigned int   BITFIELD;          /* range: CPU-dependent     */
  88.  
  89. #define _STDTYP
  90. #endif
  91.